package org.scala.test.pool

class TaskProcessEventLoop(name:String) extends EventLoop[TaskEvent](name) {
  
  
  def post(event:TaskEvent):Unit={
    eventQueue.put(event)
  }
  
  protected def onError(e: Throwable): Unit = {
    
  }
  protected def onReceive: PartialFunction[TaskEvent,Unit] = {
    case TaskSubmitted(taskName)=>{
       println(taskName)
       //  怎么样得到case 中的 class 引用
    }
    case TaskSucceed(taskName) =>{
       println(taskName)
           
    }
  }
  
  
  override def onStart(threadName: String): Unit = {
    
  }

  
}